
let digitsLettersMap = {
    '2': ['a','b','c'],
    '3': ['d','e','f'],
    '4': ['g','h','i'],
    '5': ['j','k','l'],
    '6': ['m','n','o'],
    '7': ['p','q','r','s'],
    '8': ['t','u','v'],
    '9': ['w','x','y','z'],
}
function letterCombinations(digits: string): string[] {
    if(!digits){
        return [];
    }
    let resultAll:string[] = []
    const divideConquer = function (digits:string, deep:number, result:string) {
        if(deep === digits.length){
            return resultAll.push(result)
        }
        let char:string = digits[deep];
        for(let di of digitsLettersMap[char]){
            divideConquer(digits,deep +1, result+di)
        }

    }
    divideConquer(digits,0,'')
    return resultAll;
};